//
//  JWWebViewController.m
//  JWMovie
//
//  Created by Jorn.Wu on 15/7/28.
//  Copyright (c) 2015年 Jorn.Wu. All rights reserved.
//

#import "JWWebViewController.h"
#import "JWNewsWebView.h"

@interface JWWebViewController ()

@end

@implementation JWWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"电影资讯";
    
    [self addWebView];
    [self addItemBtn];
}
- (void)addItemBtn{
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(itemBtnAction)];
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : [UIColor whiteColor]};
}
- (void)itemBtnAction{
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)addWebView{
    JWNewsWebView *webView = [[JWNewsWebView alloc] initWithFrame:self.view.frame];
    [self.view addSubview:webView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
